#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
int moths(int n)
{
	int a = 1;
	int b = 1;
	int c = 1;
	if (n <= 2)
	{
		return 1;
	}
	else
	{
		for (; n > 2;)
		{
			a = b + c;
			n--;
			b = c;
			c = a;

		}
		return a;
	}

}

int main()
{
	int n;
	scanf("%d",&n);
	int b = moths(n);
	printf("%d", b);
	return 0;
}